{% extends "polls/base.html" %}
{% block title %}<title>index</title>{% endblock %}
{% block body %}
<a href="{% url 'polls:css' %}">css page</a>
{# <a href="{% url 'polls:detail' poll.id %}">Vote?</a> #}
<a href="{% url 'polls:index' %}">Back to Index</a>
<a href="{% url 'polls:about' %}">About</a>
<a href="{% url 'polls:create' %}">Create polls</a>
<a href="{% url 'polls:search_form' %}">Search</a>
{% if latest_poll_list %}
<table style="border:  1px blue; background: silver;">
  <tr><th>no</th><th>question</th><th>pub_date</th></tr>
  {% for poll in latest_poll_list %}
  <tr><td><a href="{% url 'polls:detail' poll.id %}">{{ forloop.counter }}</a></td><td><a href="{% url 'polls:results'  poll.id %}">{{ poll.question }}</a></td><td>{{ poll.pub_date | date:"Y-n-j H:i:s"}}</td></tr>
  {% endfor %}
</table>
{% else %}
<p>No polls are available.</p>
{% endif %}
{% endblock %}
